package com.xucan.mapperstruct;

import java.util.Date;

public class M {

    public static void main(String[] args) {
        User user = new User();
        user.setId(1);
        user.setName("xucan");
        user.setDate(new Date());
        // 直接调用定义好的接口方法
        // User 实体类转换成 UserDTO
        UserDTO userDTO = UserMapper.INSTANCE.userToUserDTO(user);
        System.out.println(userDTO);
    }


}
